function getAgeByBirthday(strBirthday){       
	var returnAge;
	var strBirthdayArr=strBirthday.split("-");
	var birthYear = strBirthdayArr[0];
	var birthMonth = strBirthdayArr[1];
	var birthDay = strBirthdayArr[2];
	
	d = new Date();
	var nowYear = d.getFullYear();
	var nowMonth = d.getMonth() + 1;
	var nowDay = d.getDate();
	
	if(nowYear == birthYear){
		returnAge = 0;//同年 则为0岁
	}
	else{
		var ageDiff = nowYear - birthYear ; //年之差
		if(ageDiff > 0){
			if(nowMonth == birthMonth) {
				var dayDiff = nowDay - birthDay;//日之差
				if(dayDiff < 0)
				{
					returnAge = ageDiff - 1;
				}
				else
				{
					returnAge = ageDiff ;
				}
			}
			else
			{
				var monthDiff = nowMonth - birthMonth;//月之差
				if(monthDiff < 0)
				{
					returnAge = ageDiff - 1;
				}
				else
				{
					returnAge = ageDiff ;
				}
			}
		}
		else
		{
			returnAge = -1;//返回-1 表示出生日期输入错误 晚于今天
		}
	}
	
	return returnAge;//返回周岁年龄
	
}


function getConstellationByYear(strBirthday) { 
	var value;
	var strBirthdayArr=strBirthday.split("-");
	var birthMonth = strBirthdayArr[1];
	var birthDay = strBirthdayArr[2];

	if (birthMonth == 1 && birthDay >=20 || birthMonth == 2 && birthDay <=18) {value = "水瓶座";} 
	if (birthMonth == 1 && birthDay > 31) {value = "Huh?";} 
	if (birthMonth == 2 && birthDay >=19 || birthMonth == 3 && birthDay <=20) {value = "双鱼座";} 
	if (birthMonth == 2 && birthDay > 29) {value = "Say what?";} 
	if (birthMonth == 3 && birthDay >=21 || birthMonth == 4 && birthDay <=19) {value = "白羊座";} 
	if (birthMonth == 3 && birthDay > 31) {value = "OK. Whatever.";} 
	if (birthMonth == 4 && birthDay >=20 || birthMonth == 5 && birthDay <=20) {value = "金牛座";} 
	if (birthMonth == 4 && birthDay > 30) {value = "I'm soooo sorry!";} 
	if (birthMonth == 5 && birthDay >=21 || birthMonth == 6 && birthDay <=21) {value = "双子座";} 
	if (birthMonth == 5 && birthDay > 31) {value = "Umm ... no.";} 
	if (birthMonth == 6 && birthDay >=22 || birthMonth == 7 && birthDay <=22) {value = "巨蟹座";} 
	if (birthMonth == 6 && birthDay > 30) {value = "Sorry.";} 
	if (birthMonth == 7 && birthDay >=23 || birthMonth == 8 && birthDay <=22) {value = "狮子座";} 
	if (birthMonth == 7 && birthDay > 31) {value = "Excuse me?";} 
	if (birthMonth == 8 && birthDay >=23 || birthMonth == 9 && birthDay <=22) {value = "室女座";} 
	if (birthMonth == 8 && birthDay > 31) {value = "Yeah. Right.";} 
	if (birthMonth == 9 && birthDay >=23 || birthMonth == 10 && birthDay <=22) {value = "天秤座";} 
	if (birthMonth == 9 && birthDay > 30) {value = "Try Again.";} 
	if (birthMonth == 10 && birthDay >=23 || birthMonth == 11 && birthDay <=21) {value = "天蝎座";} 
	if (birthMonth == 10 && birthDay > 31) {value = "Forget it!";} 
	if (birthMonth == 11 && birthDay >=22 || birthMonth == 12 && birthDay <=21) {value = "人马座";} 
	if (birthMonth == 11 && birthDay > 30) {value = "Invalid Date";} 
	if (birthMonth == 12 && birthDay >=22 || birthMonth == 1 && birthDay <=19) {value = "摩羯座";} 
	if (birthMonth == 12 && birthDay > 31) {value = "No way!";} 
	return  value;
}






